package com.sx.yqxt.controller;


import com.sx.yqxt.pojo.vo.*;
import com.sx.yqxt.service.RecordService;
import com.sx.yqxt.utils.HttpResquest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-06-13
 */
@CrossOrigin
@RestController
@RequestMapping("/record")
public class RecordController {

    @Autowired
    private RecordService recordService;



    @RequestMapping("/getData")
    public RecordVO getData(){
        return recordService.getRecordVo();
    }
    @RequestMapping("/getData2")
    public RecordVO2 getData2(){
        return recordService.getRecordVo2();
    }
    @RequestMapping("/update")
    public void update(){
        recordService.updateMes();
    }
    @RequestMapping("/getMap1")//累计
    public List<MapVO> getMap1(){
        return recordService.getMap1();
    }
    @RequestMapping("/getMap2")//当前
    public List<MapVO> getMap2(){
        return recordService.getMap2();
    }
    @RequestMapping("/getMap3")//累计
    public List<MapVO> getMap3(){
        return recordService.getMap3();
    }
    @RequestMapping("/getMap4")//当前
    public List<MapVO> getMap4(){
        return recordService.getMap4();
    }
    @RequestMapping("/getChartNum1")
    public List<ChartNumVO1> getChartNum1(){
        return recordService.getChar1();
    }
    @RequestMapping("/getChartNum2")
    public List<ChartNumVO2> getChartNum2(){
        return recordService.getChar2();
    }
    @RequestMapping("/getChartNum3")
    public List<ChartNumVO3> getChartNum3(){
        return recordService.getChar3();
    }
    @RequestMapping("/getTable1")
    public List<TableVO> getTable1(){
        return recordService.getTableVO();
    }

}

